package chase.java.unit;

import java.util.ArrayList;
import java.util.List;

public class Edge {

    List<Point> points;

    public Edge() {
        this.points = new ArrayList<>();

    }

    public void add(Point p){
        this.points.add(p);
    }

    public Point get(int index){
        return points.get(index);
    }

    public int length(){
        return points.size();
    }

    public Point begin(){
        return this.points.get(0);
    }

    public Point end(){
        return this.points.get(this.points.size()-1);
    }
}
